package com.xgp.company.创建型模式.第三种_建造者模式.常规用法_套餐用法;

//具体的建造者
public class Worker extends Builder {

    private Product product;

    public Worker() {
        product = new Product();
    }

    @Override
    void buildA() {
        product.setBuildA("铺地基");
        System.out.println("铺地基");
    }

    @Override
    void buildB() {
        product.setBuildB("搭钢筋");
        System.out.println("搭钢筋");
    }

    @Override
    void buildC() {
        product.setBuildC("铺电线");
        System.out.println("铺电线");
    }

    @Override
    void buildD() {
        product.setBuildD("粉刷墙壁");
        System.out.println("粉刷墙壁");
    }

    @Override
    Product getProduct() {
        return product;
    }
}
